/*
 * Project: com.common.framework.util
 *
 * File Created at 2019-10-20
 *
 * Copyright 2019 CMCC Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * ZYHY Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license.
 */
package com.common.framework.util;

import javax.validation.constraints.NotNull;

/**
 * @author jianghucoding
 * @date 2019-10-20
 */
public class HttpUtil {

    public static String analysisAuthorization(@NotNull String authorization) {
        int index = authorization.indexOf("Bearer ");
        if (index == -1) { // 未找到
            return null;
        }
        return authorization.substring(index + 7).trim();
    }
}
